#pragma once
#ifndef __STREAM_SAVE_H
#define __STREAM_SAVE_H

#include "video.h"
#include "audio_ctrl.h"

class StreamSaveThread : public QThread
{
	Q_OBJECT

public:
	explicit StreamSaveThread(int id = 0, QObject* parent = nullptr) : m_id(id),
		QThread(parent),
		m_stop(true)
	{
	}

	void stream_save_start();
	void stream_save_stop();
	
protected:
	void run() override;

private:
	int m_id;
	bool m_stop;

	AVFormatContext* out_fmt_ctx = NULL;

};



#endif // !__STREAM_SAVE_H
